﻿using System;
using System.Configuration;
using System.Globalization;
using System.Web;
using Microsoft.Reporting.WebForms;

namespace PreContractWeb.Report.Monthly
{
    public partial class _1_3_1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                BEGDC.PreContract.BLL.Authentication.PCIdentity user = new BEGDC.PreContract.BLL.Authentication.PCIdentity(HttpContext.Current.User.Identity);
                if (user != null && user.EmployeeId > 0)
                {
                    this.ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportingServer"]);
                    ReportParameter employeeIDParameter = new ReportParameter("employeeID", user.EmployeeId.ToString(CultureInfo.InvariantCulture));
                    this.ReportViewer1.ServerReport.SetParameters(new ReportParameter[] { employeeIDParameter });
                }
            }
        }
    }
}